import axios from './request'

//一个接口封装成一个函数
//登陆
function staff_login( params = {} ){
    return axios.post('/api/staff/login', params )
}
//注册-----添加
function staff_add( params = {} ){
    return axios.post('/api/staff/add', params )
}
//角色列表
function role_list( params = {} ){
    return axios.get('/api/role/list', {params} )
}
//轮播图一接口
function base_swiper1( params = {} ){
    return axios.get('/api/base/swiper1', {params} )
}

//轮播图二接口
function base_swiper2( params = {} ){
    return axios.get('/api/base/swiper2', {params} )
}
// 员工 - 模糊搜索(分页)
function staff_search( params = {} ){
    return axios.post('/api/staff/search', params )
}
// 员工 - 删除
function staff_del( params = {} ){
    return axios.post('/api/staff/del', params )
}
//员工---编辑
function staff_edit( params = {} ){
    return axios.post('/api/staff/edit', params )
}
//客户-模糊搜索
function custom_search( params = {} ){
    return axios.post('/api/custom/search', params )
}
//删除单个客户
function custom_del( params = {} ){
    return axios.post('/api/custom/del', params )
}
//删除多个客户
function custom_delmany( params = {} ){
    return axios.post('/api/custom/delmany', params )
}
//客户 - 批量更新客户leader
function custom_changeleader( params = {} ){
    return axios.post('/api/custom/changeleader', params )
}

// 系统管理 - 实时数据
function system_realtimedata( params = {} ){
    return axios.get('/api/system/realtimedata', {params} )
}
// 系统管理 - 实时数据2
function system_historydata( params = {} ){
    return axios.get('/api/system/historydata', {params} )
}

export {
    staff_add,
    staff_login,
    role_list,
    base_swiper1,
    base_swiper2,
    staff_search,
    staff_del,
    staff_edit,
    custom_search,
    custom_del,
    custom_delmany,
    custom_changeleader,
    system_realtimedata,
    system_historydata
    
}